<!DOCTYPE html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <link rel="icon" href="/favicon-48x48.97046865.png">
  <link rel="apple-touch-icon" href="/apple-touch-icon.0ea0fa02.png">
  <meta name="theme-color" content="#ffffff">
  <link rel="manifest" href="/manifest.56b1cedc.json">
  <script>
    Array.prototype.flat && Array.prototype.includes || document.write(
      '<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.flat%2Ces6"><\/script>')
  </script>
  <title>JavaScript | MDN</title>
  <link rel="preload" as="font" type="font/woff2" crossorigin=""
    href="/static/media/ZillaSlab-Bold.subset.0beac26b.woff2">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript" hreflang="zh">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript" hreflang="zh">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/ru/docs/Web/JavaScript" hreflang="ru">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/pt-BR/docs/Web/JavaScript" hreflang="pt">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/pl/docs/Web/JavaScript" hreflang="pl">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/ko/docs/Web/JavaScript" hreflang="ko">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/ja/docs/Web/JavaScript" hreflang="ja">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/fr/docs/Web/JavaScript" hreflang="fr">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/es/docs/Web/JavaScript" hreflang="es">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" hreflang="en">
  <link rel="alternate" title="JavaScript" href="https://developer.mozilla.org/de/docs/Web/JavaScript" hreflang="de">
  <meta name="description" content="
        JavaScript&nbsp;(&nbsp;JS&nbsp;) 是一种具有函数优先的轻量级，解释型或即时编译型的编程语言。虽然它是作为开发Web 页面的脚本语言而出名的，但是它也被用到了很多非浏览器环境中，例如 Node.js、&nbsp;Apache CouchDB&nbsp;和 Adobe Acrobat。JavaScript 是一种基于原型编程、多范式的动态脚本语言，并且支持面向对象、命令式和声明式（如函数式编程）风格。了解更多&nbsp;JavaScript。
        ">
  <meta property="og:url" content="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript">
  <meta property="og:title" content="JavaScript | MDN">
  <meta property="og:description" content="
        JavaScript&nbsp;(&nbsp;JS&nbsp;) 是一种具有函数优先的轻量级，解释型或即时编译型的编程语言。虽然它是作为开发Web 页面的脚本语言而出名的，但是它也被用到了很多非浏览器环境中，例如 Node.js、&nbsp;Apache CouchDB&nbsp;和 Adobe Acrobat。JavaScript 是一种基于原型编程、多范式的动态脚本语言，并且支持面向对象、命令式和声明式（如函数式编程）风格。了解更多&nbsp;JavaScript。
        ">
  <meta property="og:locale" content="zh-CN">
  <meta property="og:image" content="https://developer.mozilla.org/mdn-social-share.0ca9dbda.png">
  <meta property="twitter:card" content="summary_large_image">
  <meta name="robots" content="index, follow">
  <link rel="canonical" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript">
  <style media="print">
    .breadcrumbs-container,
    .document-toc-container,
    .language-menu,
    .language-toggle,
    .on-github,
    .page-footer,
    .page-header-main,
    nav.sidebar,
    ul.prev-next {
      display: none !important
    }

    .main-page-content,
    .main-page-content pre {
      padding: 2px
    }

    .main-page-content pre {
      border-left-width: 2px
    }
  </style>
  <link href="/static/css/main.061eafd4.chunk.css" rel="stylesheet">
  <script>
    LUX = (function () {
      var a = ("undefined" !== typeof (LUX) && "undefined" !== typeof (LUX.gaMarks) ? LUX.gaMarks : []);
      var d = ("undefined" !== typeof (LUX) && "undefined" !== typeof (LUX.gaMeasures) ? LUX.gaMeasures : []);
      var j = "LUX_start";
      var k = window.performance;
      var l = ("undefined" !== typeof (LUX) && LUX.ns ? LUX.ns : (Date.now ? Date.now() : +(new Date())));
      if (k && k.timing && k.timing.navigationStart) {
        l = k.timing.navigationStart
      }

      function f() {
        if (k && k.now) {
          return k.now()
        }
        var o = Date.now ? Date.now() : +(new Date());
        return o - l
      }

      function b(n) {
        if (k) {
          if (k.mark) {
            return k.mark(n)
          } else {
            if (k.webkitMark) {
              return k.webkitMark(n)
            }
          }
        }
        a.push({
          name: n,
          entryType: "mark",
          startTime: f(),
          duration: 0
        });
        return
      }

      function m(p, t, n) {
        if ("undefined" === typeof (t) && h(j)) {
          t = j
        }
        if (k) {
          if (k.measure) {
            if (t) {
              if (n) {
                return k.measure(p, t, n)
              } else {
                return k.measure(p, t)
              }
            } else {
              return k.measure(p)
            }
          } else {
            if (k.webkitMeasure) {
              return k.webkitMeasure(p, t, n)
            }
          }
        }
        var r = 0,
          o = f();
        if (t) {
          var s = h(t);
          if (s) {
            r = s.startTime
          } else {
            if (k && k.timing && k.timing[t]) {
              r = k.timing[t] - k.timing.navigationStart
            } else {
              return
            }
          }
        }
        if (n) {
          var q = h(n);
          if (q) {
            o = q.startTime
          } else {
            if (k && k.timing && k.timing[n]) {
              o = k.timing[n] - k.timing.navigationStart
            } else {
              return
            }
          }
        }
        d.push({
          name: p,
          entryType: "measure",
          startTime: r,
          duration: (o - r)
        });
        return
      }

      function h(n) {
        return c(n, g())
      }

      function c(p, o) {
        for (i = o.length - 1; i >= 0; i--) {
          var n = o[i];
          if (p === n.name) {
            return n
          }
        }
        return undefined
      }

      function g() {
        if (k) {
          if (k.getEntriesByType) {
            return k.getEntriesByType("mark")
          } else {
            if (k.webkitGetEntriesByType) {
              return k.webkitGetEntriesByType("mark")
            }
          }
        }
        return a
      }
      return {
        mark: b,
        measure: m,
        gaMarks: a,
        gaMeasures: d
      }
    })();
    LUX.ns = (Date.now ? Date.now() : +(new Date()));
    LUX.ac = [];
    LUX.cmd = function (a) {
      LUX.ac.push(a)
    };
    LUX.init = function () {
      LUX.cmd(["init"])
    };
    LUX.send = function () {
      LUX.cmd(["send"])
    };
    LUX.addData = function (a, b) {
      LUX.cmd(["addData", a, b])
    };
    LUX_ae = [];
    window.addEventListener("error", function (a) {
      LUX_ae.push(a)
    });
    LUX_al = [];
    if ("function" === typeof (PerformanceObserver) && "function" === typeof (PerformanceLongTaskTiming)) {
      var LongTaskObserver = new PerformanceObserver(function (c) {
        var b = c.getEntries();
        for (var a = 0; a < b.length; a++) {
          var d = b[a];
          LUX_al.push(d)
        }
      });
      try {
        LongTaskObserver.observe({
          type: ["longtask"]
        })
      } catch (e) {}
    };
  </script>
  <script src="https://cdn.speedcurve.com/js/lux.js?id=108906238" async="" defer="" crossorigin="anonymous"></script>
  <script defer="" src="/static/js/ga.js"></script>
  <script src="/static/js/runtime-main.ee307988.js" defer=""></script>
  <script src="/static/js/2.c6ebdd97.chunk.js" defer=""></script>
  <script src="/static/js/main.8b5c1b4b.chunk.js" defer=""></script>
</head>
<body>
  <div id="root">
    <ul id="nav-access" class="a11y-nav">
      <li><a id="skip-main" href="#content">Skip to main content</a></li>
      <li><a id="skip-search" href="#main-q">Skip to search</a></li>
      <li><a id="skip-select-language" href="#select-language">Skip to select language</a></li>
    </ul>
    <div class="page-wrapper document-page">
      <header class="page-header"><a href="/zh-CN/" class="logo" aria-label="MDN Web Docs"><svg
            xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451.74 135">
            <path
              d="M7.14 8.35v111.06h111.05V8.35zm103.71 56c-.48.92-1 1.79-1.46 2.71a3.44 3.44 0 01-3.54 2 2.4 2.4 0 00-1.55.5c-1.37.9-2.76 1.79-4.18 2.63a7.33 7.33 0 01-6.35.34 29.71 29.71 0 00-10.63-2 11.7 11.7 0 00-9.46 4.31 14.84 14.84 0 00-2.13 4.29c-1.24 3.07-2.3 21.38-2.3 26.05 0 0-17.62-3.42-34.15-20.34l4.31-11.32h-13.5l9.76-10.35h-16.8l9.77-10.34H12.69L30.45 34a40.9 40.9 0 0119.77-10.83c7.1-1.22 8.93-.53 13.31.77l2.43.73.85.25 3.1.95a12.56 12.56 0 006.21.09 11.37 11.37 0 018.25 1 8.24 8.24 0 014.1 6.22 7.29 7.29 0 003.61 5.49 59.45 59.45 0 009.32 4.11c2.27.86 4.54 1.84 6.79 2.72a6.81 6.81 0 012.86 2.06 4.81 4.81 0 011.1 2.73c.14 2 .37 4 .47 6a15.24 15.24 0 01-1.77 8.03zM320.12 39.62a5.42 5.42 0 00-4.53 2.13 7.36 7.36 0 00-1.7 4.43v2.36a6.28 6.28 0 001.7 4.46 5.63 5.63 0 004.3 1.82 5.12 5.12 0 004.57-2.27A9.7 9.7 0 00326 47a8.11 8.11 0 00-1.67-5.52 5.36 5.36 0 00-4.21-1.86zM387.38 39.53a5.52 5.52 0 00-4.7 2.15 8.8 8.8 0 00-1.63 5.49 9.23 9.23 0 001.58 5.45 5.38 5.38 0 004.7 2.25 5.61 5.61 0 004.74-2.2 8.91 8.91 0 001.68-5.59 8.24 8.24 0 00-1.75-5.52 5.76 5.76 0 00-4.62-2.03zM299.47 41.35a4.34 4.34 0 00-4-1.92 4.55 4.55 0 00-3.89 1.73 8.37 8.37 0 00-1.58 4.17h10.48a6.3 6.3 0 00-1.01-3.98zM357.74 30.75H352v23.31h5.72q5.47 0 8.35-3t2.93-8.65q0-5.43-2.88-8.55t-8.38-3.11z">
            </path>
            <path
              d="M121.55 8.35v70.8h323V8.35zm42.21 22.45h-4V54h3.68v3.73h-11.25V54h3.31V36.79h-.19l-9.63 19.12h-2.12l-10-19.4h-.19V54h3.45v3.73h-11.15V54h3.68V30.8h-4v-3.73H133l11.66 22.56h.19l11.18-22.56h7.7zm29.12 22.67q-4.11 4.28-11.38 4.28h-14.06v-3.69h3.73V30.75h-3.73v-3.68h13.83q7.59 0 11.66 4.29a15.4 15.4 0 014 11 15.33 15.33 0 01-4.05 11.11zm38.89-22.67h-3.68v27h-2.6L208.08 35h-.19v19h4.67v3.73h-12.22V54h3.49V30.8h-4v-3.73h7.08l16.9 22.09h.19V30.8h-4.58v-3.73h12.32zm43.8 27h-3.31l-7.83-23.18h-.19l-7.55 23.18h-3.35l-8.78-27h-2.65v-3.73H253v3.73h-3.87L255 50.71h.23l6.61-19.91H259v-3.73h11v3.73h-2.78l6.61 20.1h.23l5.43-20.1h-4.15v-3.73h11v3.73h-2.54zm26.71-1.51a9.66 9.66 0 01-6.42 2 10.2 10.2 0 01-7.41-2.74c-1.89-1.82-2.83-4.47-2.83-7.93a12.37 12.37 0 012.64-8.12 9 9 0 017.32-3.21 8.62 8.62 0 016.75 2.69 9.65 9.65 0 012.45 6.52 13.67 13.67 0 01-.28 2.69H290q.29 6.71 6.18 6.7a5.2 5.2 0 003.71-1.18 5.82 5.82 0 001.67-2.83l3.45.71a7.21 7.21 0 01-2.73 4.65zm25.77-1.63c-1.51 2.4-3.92 3.61-7.22 3.61s-5.84-1.29-7.22-3.87c0 .25-.1.82-.21 1.7s-.19 1.44-.22 1.7H309c.16-1 .31-2 .47-3.07a21.42 21.42 0 00.24-3.16v-23h-3.4v-3.3h7.55V40.9a9.76 9.76 0 012.67-3.28 7.33 7.33 0 014.74-1.4 8.48 8.48 0 016.5 2.78q2.55 2.74 2.55 7.74a14.6 14.6 0 01-2.27 7.87zm41.39-1.14q-4.11 4.28-11.37 4.28H344v-3.74h3.73V30.75H344v-3.68h13.83q7.59 0 11.66 4.29a15.41 15.41 0 014.06 11 15.34 15.34 0 01-4.11 11.11zm25.65 1.68a10.53 10.53 0 01-7.9 3.07 10 10 0 01-7.63-3 10.93 10.93 0 01-2.8-7.83 12.13 12.13 0 012.69-7.93q2.69-3.3 8-3.3t8 3.28a12 12 0 012.64 7.76 10.86 10.86 0 01-3 7.9zm22.61.57c-1.4 1.66-3.63 2.5-6.68 2.5a9.58 9.58 0 01-7.15-2.76q-2.72-2.76-2.71-7.91a12.25 12.25 0 012.69-8 9.17 9.17 0 017.5-3.28 15 15 0 013.82.48 10.37 10.37 0 013.5 1.65l.85 5.47-3.35.38-.76-3.54a8.07 8.07 0 00-4.11-1 4.9 4.9 0 00-4.39 2.15 9.93 9.93 0 00-1.41 5.55 8.9 8.9 0 001.5 5.38 5.23 5.23 0 004.44 2c2.92 0 4.67-1.7 5.23-5.1l3.5.71a10.34 10.34 0 01-2.47 5.27zm20.48.75a11.68 11.68 0 01-6.63 1.75 15.52 15.52 0 01-8.26-2.08L424 51l3.26.33-.1 2.74a7 7 0 002.06.66 12.63 12.63 0 002.19.19 8.68 8.68 0 003.66-.75 2.5 2.5 0 001.63-2.36 2.25 2.25 0 00-1.32-2.2 12.65 12.65 0 00-3.28-1 47.39 47.39 0 01-3.9-.82 7.5 7.5 0 01-3.25-1.7 4.67 4.67 0 01-1.33-3.66c0-2.36.88-4 2.62-4.91a12 12 0 015.6-1.37 15 15 0 014.08.55 16.65 16.65 0 013.47 1.39l.47 5.1-3.3.37-.48-3.3a9.5 9.5 0 00-4.06-.9 5.62 5.62 0 00-2.87.66 2.33 2.33 0 00-1.15 2.25 2.13 2.13 0 001.3 2.07 11.91 11.91 0 003.21.92 36.69 36.69 0 013.82.83 7.46 7.46 0 013.21 1.74 4.9 4.9 0 011.3 3.73 5.56 5.56 0 01-2.66 4.91z">
            </path>
            <path
              d="M181.17 30.75h-5.71v23.31h5.71q5.47 0 8.36-3t2.88-8.61q0-5.43-2.88-8.55t-8.36-3.15zM121.63 119.32V81.74h114.91v37.58zM153.22 109h-2v-6.85a4.8 4.8 0 00-1.58-4 5.57 5.57 0 00-3.55-1.26 5 5 0 00-4.92 3.26 4.19 4.19 0 00-1.88-2.46 5.82 5.82 0 00-3-.8 4.89 4.89 0 00-4.56 2.56v-2.21h-6.28v3.26h2v8.5h-2v3.23h9.11V109h-2.86v-5.25a4.4 4.4 0 01.69-2.56 2.47 2.47 0 012.21-1q2.57 0 2.56 3.63v8.41h6.29V109h-2v-5.25a4.47 4.47 0 01.67-2.56 2.42 2.42 0 012.19-1q2.63 0 2.63 3.63v8.41h6.28zm9.88-12.07q-4 0-6 2.36a8.41 8.41 0 00-2 5.66 7.25 7.25 0 002.17 5.62 8 8 0 005.65 2 8.54 8.54 0 005.94-2.11 7.27 7.27 0 002.34-5.67 8.21 8.21 0 00-2-5.51q-2.07-2.34-6.1-2.34zm-.1 12.35a3 3 0 01-2.63-1.33 5.68 5.68 0 01-.9-3.26 5 5 0 011-3.28 3.23 3.23 0 012.61-1.18 3.5 3.5 0 012.59 1.08 4.56 4.56 0 011.07 3.31 5.21 5.21 0 01-1 3.41 3.33 3.33 0 01-2.74 1.25zm25-2.3l-3.39-.29-.7 2.32H179l8.32-9.54-.32-2.23h-13.19l-.53 5.25 3.16.34.67-2.36h4.65l-8.25 9.53.44 2.26h13.13zm7.62-9.74h-4.46v5.39h4.46zm0 9.61h-4.46v5.39h4.46zm13.54-17.49h-4.23l-6.48 22.88h4.22zm8.68 0h-4.23l-6.45 22.88h4.19zm15 22.51l-.07-2.26a1.22 1.22 0 01-.56.1c-.69 0-1-.39-1-1.16v-6.49a4.39 4.39 0 00-1.8-3.84 7 7 0 00-4.16-1.28 14.55 14.55 0 00-3.16.3 24.14 24.14 0 00-3.29 1.06l-.56 3.46 3.39.4.5-1.69a2.78 2.78 0 011.08-.37 11.3 11.3 0 011.25-.07c1.19 0 1.89.37 2.09 1.1a8.55 8.55 0 01.3 2.26v.5a8.91 8.91 0 00-1.18-.11h-1.21a12.64 12.64 0 00-4.81.88 3.53 3.53 0 00-2.18 3.64 3.66 3.66 0 001.48 3.33 5.63 5.63 0 003.11 1 4.67 4.67 0 003-.91 6.78 6.78 0 001.8-2 3 3 0 003.33 3 5.54 5.54 0 002.66-.85zm-9.25-2.32a1.69 1.69 0 01-1.36-.52 1.81 1.81 0 01-.43-1.21 1.67 1.67 0 01.86-1.68 4.63 4.63 0 012-.42 7.69 7.69 0 011.07.07l1.06.13a3.58 3.58 0 01-1.08 2.74 3.24 3.24 0 01-2.11.89z">
            </path>
          </svg></a><button type="button" class="ghost main-menu-toggle" aria-haspopup="true"
          aria-label="Show Menu"></button>
        <div class="page-header-main ">
          <nav class="main-nav" aria-label="Main menu">
            <ul class="main-menu nojs">
              <li class="top-level-entry-container"><button id="technologies-button" type="button"
                  class="top-level-entry" aria-haspopup="menu" aria-expanded="false">Technologies</button>
                <ul class="technologies " role="menu" aria-labelledby="technologies-button">
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web" role="menuitem">Technologies Overview</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/HTML" role="menuitem">HTML</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/CSS" role="menuitem">CSS</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/JavaScript" role="menuitem">JavaScript</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/Guide/Graphics" role="menuitem">Graphics</a>
                  </li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/HTTP" role="menuitem">HTTP</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/API" role="menuitem">APIs</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Mozilla/Add-ons/WebExtensions"
                      role="menuitem">Browser Extensions</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/MathML" role="menuitem">MathML</a></li>
                </ul>
              </li>
              <li class="top-level-entry-container"><button id="references-guides-button" type="button"
                  class="top-level-entry" aria-haspopup="menu" aria-expanded="false">References &amp; Guides</button>
                <ul class="references-guides " role="menu" aria-labelledby="references-guides-button">
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Learn" role="menuitem">Learn web development</a>
                  </li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/Tutorials" role="menuitem">Tutorials</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/Reference" role="menuitem">References</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/Guide" role="menuitem">Developer Guides</a>
                  </li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web/Accessibility"
                      role="menuitem">Accessibility</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Games" role="menuitem">Game development</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/Web" role="menuitem">...more docs</a></li>
                </ul>
              </li>
              <li class="top-level-entry-container"><button id="feedback-button" type="button" class="top-level-entry"
                  aria-haspopup="menu" aria-expanded="false">Feedback</button>
                <ul class="feedback " role="menu" aria-labelledby="feedback-button">
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/MDN/Contribute/Feedback" role="menuitem">Send
                      Feedback</a></li>
                  <li role="none"><a tabindex="-1" href="/zh-CN/docs/MDN/Contribute" role="menuitem">Contribute to
                      MDN</a></li>
                  <li role="none"><a tabindex="-1" target="_blank" rel="noopener noreferrer"
                      href="https://github.com/mdn/content/issues/new" role="menuitem">Report a content issue
                      <!-- --> 🌐</a></li>
                  <li role="none"><a tabindex="-1" target="_blank" rel="noopener noreferrer"
                      href="https://github.com/mdn/yari/issues/new" role="menuitem">Report a platform issue
                      <!-- --> 🌐</a></li>
                </ul>
              </li>
            </ul>
          </nav>
          <div class="header-search">
            <form action="/zh-CN/search" class="search-form" role="search"><label for="main-q"
                class="visually-hidden">Search MDN</label><input type="search" name="q" id="main-q"
                class="search-input-field" placeholder="Search MDN" pattern="(.|\s)*\S(.|\s)*" required=""><input
                type="submit" class="ghost search-button" value="" aria-label="Search"></form>
          </div>
          <div class="auth-container"></div>
        </div>
      </header>
      <div class="breadcrumb-locale-container">
        <nav class="breadcrumbs-container" aria-label="Breadcrumb navigation">
          <ol typeof="BreadcrumbList" vocab="https://schema.org/" aria-label="breadcrumbs">
            <li property="itemListElement" typeof="ListItem"><a class="breadcrumb-penultimate" property="item"
                typeof="WebPage" href="/zh-CN/docs/Web"><span property="name">Web 开发技术</span></a>
              <meta property="position" content="1">
            </li>
            <li property="itemListElement" typeof="ListItem"><a class="breadcrumb-current-page" property="item"
                typeof="WebPage" href="/zh-CN/docs/Web/JavaScript"><span property="name">JavaScript</span></a>
              <meta property="position" content="2">
            </li>
          </ol>
        </nav>
        <ul class="language-toggle">
          <li><a href="#select-language" class="language-icon"><span class="show-desktop">Change language</span></a>
          </li>
          <li><a class="view-in-english" href="/en-US/docs/Web/JavaScript"><span class="show-desktop">View in</span>
              English</a></li>
        </ul>
      </div>
      <div class="localized-content-note notecard inline neutral"><a
          href="/en-US/docs/MDN/Contribute/Localize#active_locales">This page was translated from English by the
          community. Learn more and join the MDN Web Docs community.</a></div>
      <aside class="document-toc-container">
        <section class="document-toc">
          <header>
            <h2>Table of contents</h2><button type="button" class="ghost toc-trigger-mobile" aria-controls="toc-entries"
              aria-expanded="false">Table of contents</button>
          </header>
          <ul id="toc-entries">
            <li><a href="#教程">教程</a></li>
          </ul>
        </section>
      </aside>
      <main id="content" class="main-content" role="main">
        <article class="main-page-content" lang="zh-CN">
          <h1>JavaScript</h1>
          <h2 id="教程"><a href="#教程" title="Permalink to 教程">教程</a></h2>
          <div>
            <div></div>

            <div class="summary">
              <p><strong>JavaScript&nbsp;(&nbsp;</strong><strong>JS&nbsp;</strong>) 是一种具有<a
                  href="/zh-CN/docs/Glossary/First-class_Function">函数优先</a>的轻量级，解释型或即时编译型的编程语言。虽然它是作为开发Web
                页面的脚本语言而出名的，但是它也被用到了很多<a class="external"
                  href="https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages" rel=" noopener">非浏览器环境</a>中，例如
                <a class="external" href="https://nodejs.org/" rel=" noopener">Node.js</a>、&nbsp;<a class="external"
                  href="https://couchdb.apache.org" rel=" noopener">Apache CouchDB</a>&nbsp;和 <a
                  href="https://www.adobe.com/devnet/acrobat/javascript.html" class="external" rel=" noopener">Adobe
                  Acrobat</a>。JavaScript 是一种<a
                  href="/zh-CN/docs/Glossary/Prototype-based_programming">基于原型编程</a>、多范式的动态脚本语言，并且支持面向对象、命令式和声明式（如函数式编程）风格。了解更多<a
                  href="/zh-CN/docs/Web/JavaScript/About_JavaScript">&nbsp;JavaScript</a>。</p>
            </div>

            <p>本部分将专注于 JavaScript 语言本身，而非局限于网页或其他限制环境。想要了解网页有关的 <a href="/zh-CN/docs/Glossary/API">APIs</a>&nbsp;，请参考 <a
                href="/zh-CN/docs/Web/API">Web APIs</a>&nbsp;以及 <a href="/zh-CN/docs/Glossary/DOM">DOM</a>。</p>

            <p>JavaScript 的标准是 <a href="/zh-CN/docs/Web/JavaScript/Language_Resources">ECMAScript</a> 。截至 2012 年，所有的<a
                href="https://kangax.github.io/compat-table/es5/" class="external" rel=" noopener">现代浏览器</a>都完整的支持&nbsp;
              ECMAScript 5.1，旧版本的浏览器至少支持 ECMAScript 3 标准。2015年6月17日，<a href="https://www.ecma-international.org"
                class="external" rel=" noopener">ECMA国际组织</a>发布了 ECMAScript 的第六版，该版本正式名称为 ECMAScript 2015，但通常被称为
              ECMAScript 6 或者 ES6。自此，ECMAScript 每年发布一次新标准。本文档目前覆盖了最新 ECMAScript 的草案，也就是 <a
                href="https://tc39.github.io/ecma262/" class="external" rel=" noopener">ECMAScript2020</a>。</p>

            <p>不要将 JavaScript 与&nbsp;<a href="https://en.wikipedia.org/wiki/Java_(programming_language)"
                class="external" rel=" noopener">Java编程语言</a>&nbsp;混淆。虽然“Java”和“JavaScript”都是&nbsp;Oracle
              公司在美国和其他国家注册（或未注册）的商标，但是这两门语言在语法、语义与用途方面有很大不同。</p>

            <div class="column-container">
              <div class="column-half">


                <p>通过使用指南和教程来学习如何用JavaScript语言编程。</p>

                <h3 id="对于完全初学者">对于完全初学者</h3>

                <p>如果你想学习 JavaScript，但苦于没有过 JavaScript 或者其他语言的编程经验，你可以投入到我们的&nbsp;<a
                    href="/zh-CN/docs/learn/JavaScript">JavaScript 主题学习区</a>。那里有完整的学习资源：</p>

                <dl>
                  <dt><a href="/zh-CN/docs/Learn/JavaScript/First_steps">JavaScript 第一步</a></dt>
                  <dd>回答一些基本问题，比如“JavaScript 是什么？”、“它是怎么样的？”、“它可以用来做什么？”；同时还讨论如变量、字符串、数值和数组等 JavaScript 的核心特性。</dd>
                  <dt><a href="/zh-CN/docs/learn/JavaScript/Building_blocks">JavaScript 基本结构</a></dt>
                  <dd>继介绍了 JavaScript 基本的核心特性后，我们需要关注常见的代码块类型，如条件语句，循环，函数和事件。</dd>
                  <dt><a href="/zh-CN/docs/Learn/JavaScript/Objects">介绍JavaScript 对象</a></dt>
                  <dd>如果你想进一步使用该语言撰写更有效率的代码，理解 JavaScript 面向对象的精髓是很重要的，因此我们提供了该模块来帮助你理解它。</dd>
                </dl>

                <h3 id="JavaScript_指南">JavaScript 指南</h3>

                <dl>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Guide">JavaScript 指南</a></dt>
                  <dd>一份更详尽的 JavaScript 指南，适用于有过 JavaScript 或其他语言编程经验的读者。</dd>
                </dl>

                <h3 id="中级内容">中级内容</h3>

                <dl>
                  <dt><a href="/zh-CN/docs/Learn/JavaScript/Client-side_web_APIs">客户端 Web API</a></dt>
                  <dd>当你正在给网页或者网页 APP 编写客户端 JavaScript 时， 你离不开使用这些 API&nbsp;—
                    这些用来操作浏览器各个不同方面和网页所在的操作系统，甚至是来自于其他网页和服务器的数据的接口。在这个模块，我们来探究这些 API 是什么，以及怎么在你的日常开发工作中使用一些最常用的 API。
                  </dd>
                </dl>

                <dl>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript">重新介绍 JavaScript（JS 教程）</a>
                  </dt>
                  <dd>给那些有 JavaScript 基础的朋友们的&nbsp;JavaScript概述。</dd>
                </dl>

                <dl>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Data_structures">JavaScript 数据结构</a></dt>
                  <dd>JavaScript 数据结构的概述。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness">如何使用比较操作符</a></dt>
                  <dd>JavaScript 提供了三种比较操作符，包括严格比较操作符 <code>===</code> 和非严格的比较操作符 <code>==</code>，以及&nbsp;<a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is"><code>Object.is()</code></a>
                    方法。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Closures">闭包</a></dt>
                  <dd>闭包是一个函数与其本身所被定义的词法环境的结合。</dd>
                </dl>

                <h3 id="高级内容">高级内容</h3>

                <dl>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">继承和原型链</a></dt>
                  <dd>基于原型继承被外界广泛地误解与低估，这一版块对基于原型的继承作出详细解释。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></dt>
                  <dd>严格模式规定不能使用未定义的变量。严格模式是对 ECMAScript 5 的严格限制，以求得更高效的性能和更便利的调试。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Typed_arrays">JavaScript 类型数组</a></dt>
                  <dd>为使 JavaScript 处理原始二进制数据而提供的类型数组。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Memory_Management">内存管理</a></dt>
                  <dd>JavaScript 中的内存生命周期和垃圾回收机制。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/EventLoop">并发模型以及事件循环</a></dt>
                  <dd>JavaScript 具有基于“事件循环”的并发模型。</dd>
                </dl>
              </div>

              <div class="column-half">
                <h2 id="参考">参考</h2>

                <p>浏览完整的&nbsp;<a href="/zh-CN/docs/Web/JavaScript/Reference">JavaScript 参考</a>文档。</p>

                <dl>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects">标准对象 </a></dt>
                  <dd>标准的内置对象例如 <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Boolean"><code>Boolean</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date"><code>Date</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error"><code>Error</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function"><code>Function</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON"><code>JSON</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>Number</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>Object</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp"><code>RegExp</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String"><code>String</code></a>, <a
                      href="/zh-CN/docs/orphaned/Web/JavaScript/Reference/Global_Objects/Map"><code>Map</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Set"><code>Set</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap"><code>WeakMap</code></a> , <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet"><code>WeakSet</code></a>&nbsp;以及其他对象
                  </dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators">表达式和运算符</a></dt>
                  <dd>运算符的作用：<a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Operators/instanceof"><code>instanceof</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Operators/typeof"><code>typeof</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Operators/new"><code>new</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Operators/this"><code>this</code></a>，<a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">运算符优先级</a>，以及其他运算符。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements">语句和声明</a></dt>
                  <dd>了解 <a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/do...while"><code>do-while</code></a>,
                    <a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in"><code>for-in</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...of"><code>for-of</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/try...catch"><code>try-catch</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/let"><code>let</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/var"><code>var</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/const"><code>const</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/if...else"><code>if-else</code></a>, <a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Statements/switch"><code>switch</code></a>
                    以及其他语句和关键字的作用。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions">函数</a></dt>
                  <dd>学习如何使用 JavaScript 函数来开发你的应用。</dd>
                </dl>

                <h2 id="工具和资源">工具和资源</h2>

                <p>用于编写和调试 JavaScript 代码的实用工具。</p>

                <dl>
                  <dt><a href="/zh-CN/docs/Tools">Firefox 开发工具</a></dt>
                  <dd>包括 <a href="/zh-CN/docs/Tools/Scratchpad">Scratchpad</a>、<a
                      href="/zh-CN/docs/Tools/Web_Console">Web Console</a>、<a
                      href="/zh-CN/docs/conflicting/Tools/Performance">JavaScript Profiler</a>、<a
                      href="/zh-CN/docs/Tools/Debugger">Debugger</a> 等等</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/Shells">JavaScript Shells</a></dt>
                  <dd>允许您快速测试 JavaScript 代码片段。</dd>
                  <dt><a href="https://togetherjs.com/" class="external" rel=" noopener">TogetherJS</a></dt>
                  <dd>
                    <p class="hero-header-text large">添加 TogetherJS 到您的网站，让用户实时互助，协作更简单。</p>
                  </dd>
                  <dt><a href="https://stackoverflow.com/questions/tagged/javascript" class="external"
                      rel=" noopener">Stack Overflow</a></dt>
                  <dd>你可以在&nbsp;<a href="https://stackoverflow.com/" class="external" rel=" noopener">StackOverflow
                    </a>查看或者发布带有 JavaScript 标签的问题。</dd>
                  <dt><a href="/zh-CN/docs/Web/JavaScript/New_in_JavaScript">JavaScript版本和发行记录</a></dt>
                  <dd>浏览 JavaScript 的历史版本特性和实现情况.</dd>
                  <dt><a href="https://jsfiddle.net/" class="external" rel=" noopener">JSFiddle</a></dt>
                  <dd>编辑 JavaScript、CSS 和 HTML 并获得实时结果。使用外置资源，并和你的团队在线合作。</dd>
                  <dt><a href="https://plnkr.co/" class="external" rel=" noopener">Plunker</a></dt>
                  <dd>Plunker 是一个在线社区，用于创建，协作和共享您的 Web 开发创意。编辑您的 JavaScript、CSS 和 HTML 文件并获取实时结果和文件结构。</dd>
                  <dt><a href="https://jsbin.com/" class="external" rel=" noopener">JSBin</a></dt>
                  <dd>
                    <p>JS Bin 是一种开源的协作式的web 开发调试工具。</p>
                  </dd>
                </dl>
              </div>
            </div>
          </div>
        </article>
        <aside class="metadata">
          <div class="metadata-content-container">
            <div id="on-github" class="on-github">
              <h4>Found a problem with this page?</h4>
              <ul>
                <li><a href="https://github.com/mdn/translated-content/blob/main/files/zh-cn/web/javascript/index.html"
                    title="Folder: zh-cn/web/javascript (Opens in a new tab)" target="_blank"
                    rel="noopener noreferrer">Source on <b>GitHub</b></a></li>
                <li><a
                    href="https://github.com/mdn/translated-content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fzh-CN%2Fdocs%2FWeb%2FJavaScript%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60zh-cn%2Fweb%2Fjavascript%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fzh-CN%2Fdocs%2FWeb%2FJavaScript%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Ftranslated-content%2Fblob%2Fmain%2Ffiles%2Fzh-cn%2Fweb%2Fjavascript%2Findex.html%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Ftranslated-content%2Fcommit%2F235c34993c7b14f783fc8259cc237ac09f0d3e57%0A*+Document+last+modified%3A+2021-07-09T00%3A38%3A08.000Z%0A%0A%3C%2Fdetails%3E&amp;title=Issue+with+%22JavaScript%22%3A+%28short+summary+here+please%29&amp;labels=needs-triage%2Cl10n-zh"
                    title="This will take you to https://github.com/mdn/content to file a new issue" target="_blank"
                    rel="noopener noreferrer">Report a problem with this content on <b>GitHub</b></a></li>
                <li>Want to fix the problem yourself? See
                  <!-- --> <a href="https://github.com/mdn/content/blob/main/README.md" target="_blank"
                    rel="noopener noreferrer">our Contribution guide</a>.</li>
              </ul>
            </div>
            <p class="last-modified-date"><b>Last modified:</b> <time datetime="2021-07-09T00:38:08.000Z">Jul 9,
                2021</time>,
              <!-- --> <a href="/zh-CN/docs/Web/JavaScript/contributors.txt">by MDN contributors</a></p>
            <form class="language-menu">
              <fieldset id="select-language">
                <legend>Change your language</legend><label for="language-selector" class="visually-hidden">Select your
                  preferred language</label> <select id="language-selector" name="language">
                  <option selected="" value="zh-CN">中文 (简体)</option>
                  <option value="de">Deutsch</option>
                  <option value="en-US">English (US)</option>
                  <option value="es">Español</option>
                  <option value="fr">Français</option>
                  <option value="ja">日本語</option>
                  <option value="ko">한국어</option>
                  <option value="pl">Polski</option>
                  <option value="pt-BR">Português (do&nbsp;Brasil)</option>
                  <option value="ru">Русский</option>
                  <option value="zh-TW">正體中文 (繁體)</option>
                </select> <button type="submit" class="button minimal">Change language</button>
              </fieldset>
            </form>
          </div>
        </aside>
      </main>
      <nav id="sidebar-quicklinks" class="sidebar">
        <h4>Related Topics</h4>
        <div>
          <ol>
            <li><a href="/zh-CN/docs/Web/JavaScript"><strong><em>JavaScript</em></strong></a></li>
            <li><a href="/zh-CN/docs/Web/JavaScript/Tutorials"><strong>教程:</strong></a></li>
            <li class="toggle">
              <details>
                <summary>快速入门</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Learn/Getting_started_with_the_web/JavaScript_basics">JavaScript 基础知识</a>
                  </li>
                  <li><a href="/zh-CN/docs/Learn/JavaScript/First_steps">JavaScript first steps</a></li>
                  <li><a href="/zh-CN/docs/Learn/JavaScript/Building_blocks">JavaScript building blocks</a></li>
                  <li><a href="/zh-CN/docs/Learn/JavaScript/Objects">Introducing JavaScript objects</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>JavaScript 指南</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Introduction">Introduction</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Grammar_and_Types">Grammar and types</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Control_flow_and_error_handling">Control flow and error
                      handling</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Loops_and_iteration">Loops and iteration</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Functions">Functions</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Expressions_and_Operators">Expressions and operators</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates">Numbers and dates</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Text_formatting">Text formatting</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions">Regular expressions</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Indexed_collections">Indexed collections</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Keyed_collections">Keyed collections</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Working_with_Objects">Working with objects</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Details_of_the_Object_Model">Details of the object
                      model</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Using_promises">Using promises</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Iterators_and_generators">Iterators and generators</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Meta_programming">Meta programming</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Guide/Modules">JavaScript modules</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>中级教程</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks">Client-side
                      JavaScript frameworks</a></li>
                  <li><a href="/zh-CN/docs/Learn/JavaScript/Client-side_web_APIs">Client-side web APIs</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript">深入 JavaScript</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Data_structures">JavaScript 数据结构</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness">如何正确判断相等性</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Closures">Closures</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>高级</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">继承和原型链</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Typed_arrays">JavaScript 类型化数组</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Memory_Management">内存管理</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/EventLoop">Concurrency model and Event Loop</a></li>
                </ol>
              </details>
            </li>
            <li><strong><a href="/zh-CN/docs/Web/JavaScript/Reference">引用:</a></strong></li>
            <li class="toggle">
              <details>
                <summary>内置对象</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/AggregateError">AggregateError</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer">ArrayBuffer</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction">AsyncFunction</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Atomics">Atomics</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt">BigInt</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array">BigInt64Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array">BigUint64Array</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DataView">DataView</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/decodeURI">decodeURI()</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent">decodeURIComponent()</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURI">encodeURI()</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent()</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></li>
                  <li><svg class="icon icon-deprecated" tabindex="0">
                      <use xlink:href="/assets/badges.svg#icon-deprecated"></use>
                    </svg><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/escape">escape()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/eval">eval()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/EvalError">EvalError</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry">FinalizationRegistry</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Float32Array">Float32Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Float64Array">Float64Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Generator">Generator</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction">GeneratorFunction</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/globalThis">globalThis</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Infinity">Infinity</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int16Array">Int16Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int32Array">Int32Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int8Array">Int8Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/InternalError">InternalError</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl">Intl</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/isFinite">isFinite()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/isNaN">isNaN()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON">JSON</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math">Math</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/NaN">NaN</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/null">null</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/parseFloat">parseFloat()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/parseInt">parseInt()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy">Proxy</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RangeError">RangeError</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError">ReferenceError</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect">Reflect</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Set">Set</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer">SharedArrayBuffer</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol">Symbol</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError">SyntaxError</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">TypedArray</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypeError">TypeError</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array">Uint16Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array">Uint32Array</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray">Uint8ClampedArray</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></li>
                  <li><svg class="icon icon-deprecated" tabindex="0">
                      <use xlink:href="/assets/badges.svg#icon-deprecated"></use>
                    </svg><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/unescape">unescape()</a></li>
                  <li><svg class="icon icon-nonstandard" tabindex="0">
                      <use xlink:href="/assets/badges.svg#icon-nonstandard"></use>
                    </svg><svg class="icon icon-deprecated" tabindex="0">
                      <use xlink:href="/assets/badges.svg#icon-deprecated"></use>
                    </svg><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/uneval">uneval()</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/URIError">URIError</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakRef">WeakRef</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet">WeakSet</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly">WebAssembly</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>表达式和运算符</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Addition_assignment">Addition assignment
                      (+=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Addition">Addition (+)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Assignment">Assignment (=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function">async function
                      expression</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/await">await</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_AND_assignment">Bitwise AND
                      assignment (&amp;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_AND">Bitwise AND (&amp;)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT">Bitwise NOT (~)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment">Bitwise OR
                      assignment (|=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_OR">Bitwise OR (|)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment">Bitwise XOR
                      assignment (^=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR">Bitwise XOR (^)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/class">class expression</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Comma_Operator">Comma operator (,)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Conditional_Operator">Conditional
                      (ternary) operator</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Decrement">Decrement (--)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/delete">delete operator</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">Destructuring
                      assignment</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Division_assignment">Division assignment
                      (/=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Division">Division (/)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Equality">Equality (==)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Exponentiation_assignment">Exponentiation
                      assignment (**=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Exponentiation">Exponentiation (**)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/function*">function* expression</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/function">Function expression</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal">Greater than or
                      equal (&gt;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Greater_than">Greater than (&gt;)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Grouping">Grouping operator ( )</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/in">in operator</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Increment">Increment (++)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Inequality">Inequality (!=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/instanceof">instanceof</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Left_shift_assignment">Left shift
                      assignment (&lt;&lt;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Left_shift">Left shift (&lt;&lt;)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Less_than_or_equal">Less than or equal
                      (&lt;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Less_than">Less than (&lt;)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_AND_assignment">Logical AND
                      assignment (&amp;&amp;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_AND">Logical AND (&amp;&amp;)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_NOT">Logical NOT (!)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_nullish_assignment">Logical
                      nullish assignment (??=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment">Logical OR
                      assignment (||=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_OR">Logical OR (||)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Multiplication_assignment">Multiplication
                      assignment (*=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Multiplication">Multiplication (*)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/new.target">new.target</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/new">new operator</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator">Nullish
                      coalescing operator (??)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Object_initializer">Object initializer</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">Operator
                      precedence</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Optional_chaining">Optional chaining
                      (?.)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Property_Accessors">Property accessors</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Remainder_assignment">Remainder assignment
                      (%=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Remainder">Remainder (%)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Right_shift_assignment">Right shift
                      assignment (&gt;&gt;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Right_shift">Right shift (&gt;&gt;)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax">Spread syntax (...)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Strict_equality">Strict equality (===)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Strict_inequality">Strict inequality
                      (!==)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Subtraction_assignment">Subtraction
                      assignment (-=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Subtraction">Subtraction (-)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/super">super</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/this">this</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/typeof">typeof</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Unary_negation">Unary negation (-)</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Unary_plus">Unary plus (+)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift_assignment">Unsigned
                      right shift assignment (&gt;&gt;&gt;=)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift">Unsigned right shift
                      (&gt;&gt;&gt;)</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/void">void operator</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/yield*">yield*</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Operators/yield">yield</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>语句和声明</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/async_function">async function</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/block">block</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/break">break</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/class">class</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/const">const</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/continue">continue</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/debugger">debugger</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/do...while">do...while</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/Empty">empty</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/export">export</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for-await...of">for await...of</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in">for...in</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/for">for</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/function*">function*</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/function">function declaration</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/if...else">if...else</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/import.meta">import.meta</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/import">import</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/label">label</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/let">let</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/return">return</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/switch">switch</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/throw">throw</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/try...catch">try...catch</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/var">var</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/while">while</a></li>
                  <li><svg class="icon icon-deprecated" tabindex="0">
                      <use xlink:href="/assets/badges.svg#icon-deprecated"></use>
                    </svg><a href="/zh-CN/docs/Web/JavaScript/Reference/Statements/with">with</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>函数</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments">The arguments object</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Arrow function
                      expressions</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters">Default parameters</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/get">getter</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/Method_definitions">Method definitions</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/rest_parameters">Rest parameters</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/set">setter</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>Classes</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Classes/constructor">constructor</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Classes/extends">extends</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Classes/Private_class_fields">Private class
                      features</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Classes/Public_class_fields">Public class fields</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Classes/static">static</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>Errors</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Already_has_pragma">Warning: -file- is being
                      assigned a //# sourceMappingURL, but already has one</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Array_sort_argument">TypeError: invalid
                      Array.prototype.sort argument</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_octal">Warning: 08/09 is not a legal
                      ECMA-262 octal constant</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_radix">RangeError: radix must be an
                      integer</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_regexp_flag">SyntaxError: invalid regular
                      expression flag "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield">SyntaxError: return not
                      in function</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Called_on_incompatible_type">TypeError:
                      X.prototype.y called on incompatible type</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init">ReferenceError:
                      can't access lexical declaration`X' before initialization</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_access_property">TypeError: can't access
                      property "x" of "y"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_assign_to_property">TypeError: can't
                      assign to property "x" on "y": not an object</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible">TypeError:
                      can't define property "x": "obj" is not extensible</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_delete">TypeError: property "x" is
                      non-configurable and can't be deleted</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property">TypeError: can't
                      redefine non-configurable property "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value">TypeError: cyclic object
                      value</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Dead_object">TypeError: can't access dead
                      object</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Delete_in_strict_mode">SyntaxError: applying
                      the 'delete' operator to an unqualified name is deprecated</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_caller_or_arguments_usage">ReferenceError:
                      deprecated caller or arguments usage</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_expression_closures">Warning:
                      expression closures are deprecated</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_octal">SyntaxError: "0"-prefixed
                      octal literals and octal escape seq. are deprecated</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_source_map_pragma">SyntaxError:
                      Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics">Warning: String.x
                      is deprecated; use String.prototype.x instead</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat">Warning:
                      Date.prototype.toLocaleFormat is deprecated</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Equal_as_assign">SyntaxError: test for
                      equality (==) mistyped as assignment (=)?</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/For-each-in_loops_are_deprecated">Warning:
                      JavaScript 1.6's for-each-in loops are deprecated</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Getter_only">TypeError: setting getter-only
                      property "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Hash_outside_class">SyntaxError: Unexpected
                      '#' used outside of class body</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Identifier_after_number">SyntaxError:
                      identifier starts immediately after numeric literal</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Illegal_character">SyntaxError: illegal
                      character</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/in_operator_no_object">TypeError: cannot use
                      'in' operator to search for 'x' in 'y'</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length">RangeError: invalid
                      array length</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_assignment_left-hand_side">ReferenceError:
                      invalid assignment left-hand side</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment">TypeError: invalid
                      assignment to const "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_date">RangeError: invalid date</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer">SyntaxError:
                      for-in loop head declarations may not have initializers</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_for-of_initializer">SyntaxError: a
                      declaration in the head of a for-of loop can't have an initializer</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/invalid_right_hand_side_instanceof_operand">TypeError:
                      invalid 'instanceof' operand 'x'</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/is_not_iterable">TypeError: 'x' is not
                      iterable</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse">SyntaxError: JSON.parse: bad
                      parsing</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Malformed_formal_parameter">SyntaxError:
                      Malformed formal parameter</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Malformed_URI">URIError: malformed URI
                      sequence</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_bracket_after_list">SyntaxError:
                      missing ] after element list</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_colon_after_property_id">SyntaxError:
                      missing : after property id</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_function_body">SyntaxError:
                      missing } after function body</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_property_list">SyntaxError:
                      missing } after property list</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_formal_parameter">SyntaxError:
                      missing formal parameter</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const">SyntaxError:
                      missing = in const declaration</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_name_after_dot_operator">SyntaxError:
                      missing name after . operator</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_argument_list">SyntaxError:
                      missing ) after argument list</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_condition">SyntaxError:
                      missing ) after condition</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_semicolon_before_statement">SyntaxError:
                      missing ; before statement</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/More_arguments_needed">TypeError: More
                      arguments needed</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Negative_repetition_count">RangeError: repeat
                      count must be non-negative</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/No_non-null_object">TypeError: "x" is not a
                      non-null object</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/No_properties">TypeError: "x" has no
                      properties</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/No_variable_name">SyntaxError: missing
                      variable name</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Non_configurable_array_element">TypeError:
                      can't delete non-configurable array element</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_codepoint">RangeError: argument is not
                      a valid code point</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_constructor">TypeError: "x" is not a
                      constructor</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_function">TypeError: "x" is not a
                      function</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_defined">ReferenceError: "x" is not
                      defined</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Precision_range">RangeError: precision is out
                      of range</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Property_access_denied">Error: Permission
                      denied to access property "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Read-only">TypeError: "x" is read-only</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter">SyntaxError:
                      redeclaration of formal parameter "x"</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value">TypeError:
                      Reduce of empty array with no initial value</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Reserved_identifier">SyntaxError: "x" is a
                      reserved identifier</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Resulting_string_too_large">RangeError:
                      repeat count must be less than infinity</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Stmt_after_return">Warning: unreachable code
                      after return statement</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Strict_Non_Simple_Params">SyntaxError: "use
                      strict" not allowed in function with non-simple parameters</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Too_much_recursion">InternalError: too much
                      recursion</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Undeclared_var">ReferenceError: assignment to
                      undeclared variable "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Undefined_prop">ReferenceError: reference to
                      undefined property "x"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Unexpected_token">SyntaxError: Unexpected
                      token</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Unexpected_type">TypeError: "x" is (not)
                      "y"</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Unnamed_function_statement">SyntaxError:
                      function statement requires a name</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Unterminated_string_literal">SyntaxError:
                      unterminated string literal</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Errors/Var_hides_argument">TypeError: variable "x"
                      redeclares argument</a></li>
                </ol>
              </details>
            </li>
            <li class="toggle">
              <details>
                <summary>更多</summary>
                <ol>
                  <li><a href="/zh-CN/docs/Web/JavaScript/JavaScript_technologies_overview">JavaScript 知识概要</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar">词法文法</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Data_structures">JavaScript 数据结构</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Enumerability_and_ownership_of_properties">属性的可枚举性和所有权</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Iteration_protocols">Iteration protocols</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a></li>
                  <li><a
                      href="/zh-CN/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode">切换到严格模式</a>
                  </li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Template_literals">模板字符串</a></li>
                  <li><a href="/zh-CN/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features">已废弃的特性</a></li>
                </ol>
              </details>
            </li>
          </ol>
        </div>
      </nav>
    </div>
    <footer id="nav-footer" class="page-footer">
      <div class="content-container">
        <div class="page-footer-logo"><a href="/zh-CN/" class="logo" aria-label="MDN Web Docs"><svg
              xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451.74 135" fill="#fff">
              <path
                d="M7.14 8.35v111.06h111.05V8.35zm103.71 56c-.48.92-1 1.79-1.46 2.71a3.44 3.44 0 01-3.54 2 2.4 2.4 0 00-1.55.5c-1.37.9-2.76 1.79-4.18 2.63a7.33 7.33 0 01-6.35.34 29.71 29.71 0 00-10.63-2 11.7 11.7 0 00-9.46 4.31 14.84 14.84 0 00-2.13 4.29c-1.24 3.07-2.3 21.38-2.3 26.05 0 0-17.62-3.42-34.15-20.34l4.31-11.32h-13.5l9.76-10.35h-16.8l9.77-10.34H12.69L30.45 34a40.9 40.9 0 0119.77-10.83c7.1-1.22 8.93-.53 13.31.77l2.43.73.85.25 3.1.95a12.56 12.56 0 006.21.09 11.37 11.37 0 018.25 1 8.24 8.24 0 014.1 6.22 7.29 7.29 0 003.61 5.49 59.45 59.45 0 009.32 4.11c2.27.86 4.54 1.84 6.79 2.72a6.81 6.81 0 012.86 2.06 4.81 4.81 0 011.1 2.73c.14 2 .37 4 .47 6a15.24 15.24 0 01-1.77 8.03zM320.12 39.62a5.42 5.42 0 00-4.53 2.13 7.36 7.36 0 00-1.7 4.43v2.36a6.28 6.28 0 001.7 4.46 5.63 5.63 0 004.3 1.82 5.12 5.12 0 004.57-2.27A9.7 9.7 0 00326 47a8.11 8.11 0 00-1.67-5.52 5.36 5.36 0 00-4.21-1.86zM387.38 39.53a5.52 5.52 0 00-4.7 2.15 8.8 8.8 0 00-1.63 5.49 9.23 9.23 0 001.58 5.45 5.38 5.38 0 004.7 2.25 5.61 5.61 0 004.74-2.2 8.91 8.91 0 001.68-5.59 8.24 8.24 0 00-1.75-5.52 5.76 5.76 0 00-4.62-2.03zM299.47 41.35a4.34 4.34 0 00-4-1.92 4.55 4.55 0 00-3.89 1.73 8.37 8.37 0 00-1.58 4.17h10.48a6.3 6.3 0 00-1.01-3.98zM357.74 30.75H352v23.31h5.72q5.47 0 8.35-3t2.93-8.65q0-5.43-2.88-8.55t-8.38-3.11z">
              </path>
              <path
                d="M121.55 8.35v70.8h323V8.35zm42.21 22.45h-4V54h3.68v3.73h-11.25V54h3.31V36.79h-.19l-9.63 19.12h-2.12l-10-19.4h-.19V54h3.45v3.73h-11.15V54h3.68V30.8h-4v-3.73H133l11.66 22.56h.19l11.18-22.56h7.7zm29.12 22.67q-4.11 4.28-11.38 4.28h-14.06v-3.69h3.73V30.75h-3.73v-3.68h13.83q7.59 0 11.66 4.29a15.4 15.4 0 014 11 15.33 15.33 0 01-4.05 11.11zm38.89-22.67h-3.68v27h-2.6L208.08 35h-.19v19h4.67v3.73h-12.22V54h3.49V30.8h-4v-3.73h7.08l16.9 22.09h.19V30.8h-4.58v-3.73h12.32zm43.8 27h-3.31l-7.83-23.18h-.19l-7.55 23.18h-3.35l-8.78-27h-2.65v-3.73H253v3.73h-3.87L255 50.71h.23l6.61-19.91H259v-3.73h11v3.73h-2.78l6.61 20.1h.23l5.43-20.1h-4.15v-3.73h11v3.73h-2.54zm26.71-1.51a9.66 9.66 0 01-6.42 2 10.2 10.2 0 01-7.41-2.74c-1.89-1.82-2.83-4.47-2.83-7.93a12.37 12.37 0 012.64-8.12 9 9 0 017.32-3.21 8.62 8.62 0 016.75 2.69 9.65 9.65 0 012.45 6.52 13.67 13.67 0 01-.28 2.69H290q.29 6.71 6.18 6.7a5.2 5.2 0 003.71-1.18 5.82 5.82 0 001.67-2.83l3.45.71a7.21 7.21 0 01-2.73 4.65zm25.77-1.63c-1.51 2.4-3.92 3.61-7.22 3.61s-5.84-1.29-7.22-3.87c0 .25-.1.82-.21 1.7s-.19 1.44-.22 1.7H309c.16-1 .31-2 .47-3.07a21.42 21.42 0 00.24-3.16v-23h-3.4v-3.3h7.55V40.9a9.76 9.76 0 012.67-3.28 7.33 7.33 0 014.74-1.4 8.48 8.48 0 016.5 2.78q2.55 2.74 2.55 7.74a14.6 14.6 0 01-2.27 7.87zm41.39-1.14q-4.11 4.28-11.37 4.28H344v-3.74h3.73V30.75H344v-3.68h13.83q7.59 0 11.66 4.29a15.41 15.41 0 014.06 11 15.34 15.34 0 01-4.11 11.11zm25.65 1.68a10.53 10.53 0 01-7.9 3.07 10 10 0 01-7.63-3 10.93 10.93 0 01-2.8-7.83 12.13 12.13 0 012.69-7.93q2.69-3.3 8-3.3t8 3.28a12 12 0 012.64 7.76 10.86 10.86 0 01-3 7.9zm22.61.57c-1.4 1.66-3.63 2.5-6.68 2.5a9.58 9.58 0 01-7.15-2.76q-2.72-2.76-2.71-7.91a12.25 12.25 0 012.69-8 9.17 9.17 0 017.5-3.28 15 15 0 013.82.48 10.37 10.37 0 013.5 1.65l.85 5.47-3.35.38-.76-3.54a8.07 8.07 0 00-4.11-1 4.9 4.9 0 00-4.39 2.15 9.93 9.93 0 00-1.41 5.55 8.9 8.9 0 001.5 5.38 5.23 5.23 0 004.44 2c2.92 0 4.67-1.7 5.23-5.1l3.5.71a10.34 10.34 0 01-2.47 5.27zm20.48.75a11.68 11.68 0 01-6.63 1.75 15.52 15.52 0 01-8.26-2.08L424 51l3.26.33-.1 2.74a7 7 0 002.06.66 12.63 12.63 0 002.19.19 8.68 8.68 0 003.66-.75 2.5 2.5 0 001.63-2.36 2.25 2.25 0 00-1.32-2.2 12.65 12.65 0 00-3.28-1 47.39 47.39 0 01-3.9-.82 7.5 7.5 0 01-3.25-1.7 4.67 4.67 0 01-1.33-3.66c0-2.36.88-4 2.62-4.91a12 12 0 015.6-1.37 15 15 0 014.08.55 16.65 16.65 0 013.47 1.39l.47 5.1-3.3.37-.48-3.3a9.5 9.5 0 00-4.06-.9 5.62 5.62 0 00-2.87.66 2.33 2.33 0 00-1.15 2.25 2.13 2.13 0 001.3 2.07 11.91 11.91 0 003.21.92 36.69 36.69 0 013.82.83 7.46 7.46 0 013.21 1.74 4.9 4.9 0 011.3 3.73 5.56 5.56 0 01-2.66 4.91z">
              </path>
              <path
                d="M181.17 30.75h-5.71v23.31h5.71q5.47 0 8.36-3t2.88-8.61q0-5.43-2.88-8.55t-8.36-3.15zM121.63 119.32V81.74h114.91v37.58zM153.22 109h-2v-6.85a4.8 4.8 0 00-1.58-4 5.57 5.57 0 00-3.55-1.26 5 5 0 00-4.92 3.26 4.19 4.19 0 00-1.88-2.46 5.82 5.82 0 00-3-.8 4.89 4.89 0 00-4.56 2.56v-2.21h-6.28v3.26h2v8.5h-2v3.23h9.11V109h-2.86v-5.25a4.4 4.4 0 01.69-2.56 2.47 2.47 0 012.21-1q2.57 0 2.56 3.63v8.41h6.29V109h-2v-5.25a4.47 4.47 0 01.67-2.56 2.42 2.42 0 012.19-1q2.63 0 2.63 3.63v8.41h6.28zm9.88-12.07q-4 0-6 2.36a8.41 8.41 0 00-2 5.66 7.25 7.25 0 002.17 5.62 8 8 0 005.65 2 8.54 8.54 0 005.94-2.11 7.27 7.27 0 002.34-5.67 8.21 8.21 0 00-2-5.51q-2.07-2.34-6.1-2.34zm-.1 12.35a3 3 0 01-2.63-1.33 5.68 5.68 0 01-.9-3.26 5 5 0 011-3.28 3.23 3.23 0 012.61-1.18 3.5 3.5 0 012.59 1.08 4.56 4.56 0 011.07 3.31 5.21 5.21 0 01-1 3.41 3.33 3.33 0 01-2.74 1.25zm25-2.3l-3.39-.29-.7 2.32H179l8.32-9.54-.32-2.23h-13.19l-.53 5.25 3.16.34.67-2.36h4.65l-8.25 9.53.44 2.26h13.13zm7.62-9.74h-4.46v5.39h4.46zm0 9.61h-4.46v5.39h4.46zm13.54-17.49h-4.23l-6.48 22.88h4.22zm8.68 0h-4.23l-6.45 22.88h4.19zm15 22.51l-.07-2.26a1.22 1.22 0 01-.56.1c-.69 0-1-.39-1-1.16v-6.49a4.39 4.39 0 00-1.8-3.84 7 7 0 00-4.16-1.28 14.55 14.55 0 00-3.16.3 24.14 24.14 0 00-3.29 1.06l-.56 3.46 3.39.4.5-1.69a2.78 2.78 0 011.08-.37 11.3 11.3 0 011.25-.07c1.19 0 1.89.37 2.09 1.1a8.55 8.55 0 01.3 2.26v.5a8.91 8.91 0 00-1.18-.11h-1.21a12.64 12.64 0 00-4.81.88 3.53 3.53 0 00-2.18 3.64 3.66 3.66 0 001.48 3.33 5.63 5.63 0 003.11 1 4.67 4.67 0 003-.91 6.78 6.78 0 001.8-2 3 3 0 003.33 3 5.54 5.54 0 002.66-.85zm-9.25-2.32a1.69 1.69 0 01-1.36-.52 1.81 1.81 0 01-.43-1.21 1.67 1.67 0 01.86-1.68 4.63 4.63 0 012-.42 7.69 7.69 0 011.07.07l1.06.13a3.58 3.58 0 01-1.08 2.74 3.24 3.24 0 01-2.11.89z">
              </path>
            </svg></a></div>
        <ul class="link-list-mdn">
          <li><a href="/zh-CN/docs/Web">Web Technologies</a></li>
          <li><a href="/zh-CN/docs/Learn">Learn Web Development</a></li>
          <li><a href="/zh-CN/docs/MDN/About">About MDN</a></li>
          <li><a href="/zh-CN/docs/MDN/Feedback">Feedback</a></li>
        </ul>
        <ul class="link-list-moz">
          <li><a href="https://www.mozilla.org/about/" target="_blank" rel="noopener noreferrer">About</a></li>
          <li><a href="https://shop.spreadshirt.com/mdn-store/" target="_blank" rel="noopener noreferrer">MDN Web Docs
              Store</a></li>
          <li><a href="https://www.mozilla.org/contact/" target="_blank" rel="noopener noreferrer">Contact Us</a></li>
          <li><a
              href="https://www.mozilla.org/firefox/?utm_source=developer.mozilla.org&amp;utm_campaign=footer&amp;utm_medium=referral"
              target="_blank" rel="noopener noreferrer">Firefox</a></li>
        </ul>
        <div class="social social-mdn">
          <h4>MDN</h4>
          <ul>
            <li><a class="social-icon twitter" href="https://twitter.com/mozdevnet" target="_blank"
                rel="noopener noreferrer"><span class="visually-hidden">MDN on Twitter</span></a></li>
            <li><a class="social-icon github" href="https://github.com/mdn/" target="_blank"
                rel="noopener noreferrer"><span class="visually-hidden">MDN on Github</span></a></li>
          </ul>
        </div>
        <div class="social social-moz">
          <h4>Mozilla</h4>
          <ul>
            <li><a class="social-icon twitter" href="https://twitter.com/mozilla" target="_blank"
                rel="noopener noreferrer"><span class="visually-hidden">Mozilla on Twitter</span></a></li>
            <li><a class="social-icon instagram" href="https://www.instagram.com/mozillagram/" target="_blank"
                rel="noopener noreferrer"><span class="visually-hidden">Mozilla on Instagram</span></a></li>
          </ul>
        </div>
        <p id="license" class="footer-license">© 2005-
          <!-- -->2021
          <!-- --> Mozilla and individual contributors. Content is available under
          <!-- --> <a href="/docs/MDN/About#Copyrights_and_licenses">these licenses</a>.</p>
        <ul class="footer-legal">
          <li><a href="https://www.mozilla.org/about/legal/terms/mozilla" target="_blank"
              rel="noopener noreferrer">Terms</a></li>
          <li><a href="https://www.mozilla.org/privacy/websites/" target="_blank" rel="noopener noreferrer">Privacy</a>
          </li>
          <li><a href="https://www.mozilla.org/privacy/websites/#cookies" target="_blank"
              rel="noopener noreferrer">Cookies</a></li>
        </ul>
      </div>
    </footer>
    <div class="page-overlay hidden"></div>
  </div>
  <script type="application/json" id="hydration">
    {
      "doc": {
        "isMarkdown": false,
        "isTranslated": true,
        "isActive": true,
        "flaws": {},
        "title": "JavaScript",
        "mdn_url": "/zh-CN/docs/Web/JavaScript",
        "locale": "zh-CN",
        "native": "中文 (简体)",
        "sidebarHTML": "\n <ol>\n  <li><a href=\"/zh-CN/docs/Web/JavaScript\"><strong><em>JavaScript</em></strong></a></li>\n  <li><a href=\"/zh-CN/docs/Web/JavaScript/Tutorials\"><strong>教程:</strong></a></li>\n  <li class=\"toggle\">\n    <details>\n      <summary>快速入门</summary>\n      <ol>\n        <li><a href=\"/zh-CN/docs/Learn/Getting_started_with_the_web/JavaScript_basics\">JavaScript 基础知识</a></li>\n        <li><a href=\"/zh-CN/docs/Learn/JavaScript/First_steps\">JavaScript first steps</a></li>\n        <li><a href=\"/zh-CN/docs/Learn/JavaScript/Building_blocks\">JavaScript building blocks</a></li>\n        <li><a href=\"/zh-CN/docs/Learn/JavaScript/Objects\">Introducing JavaScript objects</a></li>\n      </ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>JavaScript 指南</summary>\n      <ol>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Introduction\">Introduction</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Grammar_and_Types\">Grammar and types</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Control_flow_and_error_handling\">Control flow and error handling</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Loops_and_iteration\">Loops and iteration</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Functions\">Functions</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Expressions_and_Operators\">Expressions and operators</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates\">Numbers and dates</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Text_formatting\">Text formatting</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions\">Regular expressions</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Indexed_collections\">Indexed collections</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Keyed_collections\">Keyed collections</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Working_with_Objects\">Working with objects</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Details_of_the_Object_Model\">Details of the object model</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Using_promises\">Using promises</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Iterators_and_generators\">Iterators and generators</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Meta_programming\">Meta programming</a></li>\n          <li><a href=\"/zh-CN/docs/Web/JavaScript/Guide/Modules\">JavaScript modules</a></li>\n        </ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>中级教程</summary>\n      <ol>\n        <li><a href=\"/zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks\">Client-side JavaScript frameworks</a></li>\n        <li><a href=\"/zh-CN/docs/Learn/JavaScript/Client-side_web_APIs\">Client-side web APIs</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript\">深入 JavaScript</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Data_structures\">JavaScript 数据结构</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness\">如何正确判断相等性</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Closures\">Closures</a></li>\n      </ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>高级</summary>\n      <ol>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">继承和原型链</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Strict_mode\">严格模式</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Typed_arrays\">JavaScript 类型化数组</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Memory_Management\">内存管理</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/EventLoop\">Concurrency model and Event Loop</a></li>\n      </ol>\n    </details>\n  </li>\n  <li><strong><a href=\"/zh-CN/docs/Web/JavaScript/Reference\">引用:</a></strong></li>\n  <li class=\"toggle\">\n    <details>\n       <summary>内置对象</summary>\n        <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\">AggregateError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array\">Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\">ArrayBuffer</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction\">AsyncFunction</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Atomics\">Atomics</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt\">BigInt</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array\">BigInt64Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array\">BigUint64Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Boolean\">Boolean</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DataView\">DataView</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date\">Date</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/decodeURI\">decodeURI()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent\">decodeURIComponent()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURI\">encodeURI()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent\">encodeURIComponent()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error\">Error</a></li><li><svg class=\"icon icon-deprecated\" tabindex=\"0\">\n    <use xlink:href=\"/assets/badges.svg#icon-deprecated\"></use>\n</svg><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/escape\">escape()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/eval\">eval()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/EvalError\">EvalError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\">FinalizationRegistry</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\">Float32Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\">Float64Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function\">Function</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Generator\">Generator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\">GeneratorFunction</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/globalThis\">globalThis</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Infinity\">Infinity</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\">Int16Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\">Int32Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\">Int8Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/InternalError\">InternalError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl\">Intl</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/isFinite\">isFinite()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/isNaN\">isNaN()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON\">JSON</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Map\">Map</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math\">Math</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/NaN\">NaN</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/null\">null</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number\">Number</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object\">Object</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/parseFloat\">parseFloat()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/parseInt\">parseInt()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise\">Promise</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy\">Proxy</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RangeError\">RangeError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\">ReferenceError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect\">Reflect</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp\">RegExp</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Set\">Set</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer\">SharedArrayBuffer</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String\">String</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol\">Symbol</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\">SyntaxError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\">TypedArray</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypeError\">TypeError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\">Uint16Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\">Uint32Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\">Uint8Array</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\">Uint8ClampedArray</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/undefined\">undefined</a></li><li><svg class=\"icon icon-deprecated\" tabindex=\"0\">\n    <use xlink:href=\"/assets/badges.svg#icon-deprecated\"></use>\n</svg><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/unescape\">unescape()</a></li><li><svg class=\"icon icon-nonstandard\" tabindex=\"0\">\n    <use xlink:href=\"/assets/badges.svg#icon-nonstandard\"></use>\n</svg><svg class=\"icon icon-deprecated\" tabindex=\"0\">\n    <use xlink:href=\"/assets/badges.svg#icon-deprecated\"></use>\n</svg><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/uneval\">uneval()</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/URIError\">URIError</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\">WeakMap</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakRef\">WeakRef</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\">WeakSet</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly\">WebAssembly</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>表达式和运算符</summary>\n      <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Addition_assignment\">Addition assignment (+=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Addition\">Addition (+)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Assignment\">Assignment (=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/async_function\">async function expression</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/await\">await</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_AND_assignment\">Bitwise AND assignment (&amp;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_AND\">Bitwise AND (&amp;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT\">Bitwise NOT (~)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment\">Bitwise OR assignment (|=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_OR\">Bitwise OR (|)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment\">Bitwise XOR assignment (^=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR\">Bitwise XOR (^)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/class\">class expression</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Comma_Operator\">Comma operator (,)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Conditional_Operator\">Conditional (ternary) operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Decrement\">Decrement (--)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/delete\">delete operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\">Destructuring assignment</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Division_assignment\">Division assignment (/=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Division\">Division (/)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Equality\">Equality (==)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Exponentiation_assignment\">Exponentiation assignment (**=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Exponentiation\">Exponentiation (**)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/function*\">function* expression</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/function\">Function expression</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal\">Greater than or equal (&gt;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Greater_than\">Greater than (&gt;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Grouping\">Grouping operator ( )</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/in\">in operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Increment\">Increment (++)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Inequality\">Inequality (!=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/instanceof\">instanceof</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Left_shift_assignment\">Left shift assignment (&lt;&lt;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Left_shift\">Left shift (&lt;&lt;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Less_than_or_equal\">Less than or equal (&lt;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Less_than\">Less than (&lt;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_AND_assignment\">Logical AND assignment (&amp;&amp;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_AND\">Logical AND (&amp;&amp;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_NOT\">Logical NOT (!)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_nullish_assignment\">Logical nullish assignment (??=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_OR_assignment\">Logical OR assignment (||=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_OR\">Logical OR (||)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Multiplication_assignment\">Multiplication assignment (*=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Multiplication\">Multiplication (*)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/new.target\">new.target</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/new\">new operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator\">Nullish coalescing operator (??)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Object_initializer\">Object initializer</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence\">Operator precedence</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Optional_chaining\">Optional chaining (?.)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Property_Accessors\">Property accessors</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Remainder_assignment\">Remainder assignment (%=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Remainder\">Remainder (%)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Right_shift_assignment\">Right shift assignment (&gt;&gt;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Right_shift\">Right shift (&gt;&gt;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax\">Spread syntax (...)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Strict_equality\">Strict equality (===)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Strict_inequality\">Strict inequality (!==)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Subtraction_assignment\">Subtraction assignment (-=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Subtraction\">Subtraction (-)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/super\">super</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/this\">this</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/typeof\">typeof</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Unary_negation\">Unary negation (-)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Unary_plus\">Unary plus (+)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift_assignment\">Unsigned right shift assignment (&gt;&gt;&gt;=)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift\">Unsigned right shift (&gt;&gt;&gt;)</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/void\">void operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/yield*\">yield*</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/yield\">yield</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>语句和声明</summary>\n      <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/async_function\">async function</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/block\">block</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/break\">break</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/class\">class</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/const\">const</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/continue\">continue</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/debugger\">debugger</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/do...while\">do...while</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/Empty\">empty</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/export\">export</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for-await...of\">for await...of</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in\">for...in</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for...of\">for...of</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for\">for</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/function*\">function*</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/function\">function declaration</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/if...else\">if...else</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/import.meta\">import.meta</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/import\">import</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/label\">label</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/let\">let</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/return\">return</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/switch\">switch</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/throw\">throw</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/try...catch\">try...catch</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/var\">var</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/while\">while</a></li><li><svg class=\"icon icon-deprecated\" tabindex=\"0\">\n    <use xlink:href=\"/assets/badges.svg#icon-deprecated\"></use>\n</svg><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/with\">with</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>函数</summary>\n      <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments\">The arguments object</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions\">Arrow function expressions</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters\">Default parameters</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/get\">getter</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/Method_definitions\">Method definitions</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/rest_parameters\">Rest parameters</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions/set\">setter</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>Classes</summary>\n      <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Classes/constructor\">constructor</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Classes/extends\">extends</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Classes/Private_class_fields\">Private class features</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Classes/Public_class_fields\">Public class fields</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Classes/static\">static</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>Errors</summary>\n      <ol><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Already_has_pragma\">Warning: -file- is being assigned a //# sourceMappingURL, but already has one</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Array_sort_argument\">TypeError: invalid Array.prototype.sort argument</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_octal\">Warning: 08/09 is not a legal ECMA-262 octal constant</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_radix\">RangeError: radix must be an integer</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_regexp_flag\">SyntaxError: invalid regular expression flag \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield\">SyntaxError: return not in function</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Called_on_incompatible_type\">TypeError: X.prototype.y called on incompatible type</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init\">ReferenceError: can't access lexical declaration`X' before initialization</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_access_property\">TypeError: can't access property \"x\" of \"y\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_assign_to_property\">TypeError: can't assign to property \"x\" on \"y\": not an object</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible\">TypeError: can't define property \"x\": \"obj\" is not extensible</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_delete\">TypeError: property \"x\" is non-configurable and can't be deleted</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property\">TypeError: can't redefine non-configurable property \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value\">TypeError: cyclic object value</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Dead_object\">TypeError: can't access dead object</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Delete_in_strict_mode\">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_caller_or_arguments_usage\">ReferenceError: deprecated caller or arguments usage</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_expression_closures\">Warning: expression closures are deprecated</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_octal\">SyntaxError: \"0\"-prefixed octal literals and octal escape seq. are deprecated</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_source_map_pragma\">SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics\">Warning: String.x is deprecated; use String.prototype.x instead</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat\">Warning: Date.prototype.toLocaleFormat is deprecated</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Equal_as_assign\">SyntaxError: test for equality (==) mistyped as assignment (=)?</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/For-each-in_loops_are_deprecated\">Warning: JavaScript 1.6's for-each-in loops are deprecated</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Getter_only\">TypeError: setting getter-only property \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Hash_outside_class\">SyntaxError: Unexpected '#' used outside of class body</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Identifier_after_number\">SyntaxError: identifier starts immediately after numeric literal</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Illegal_character\">SyntaxError: illegal character</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/in_operator_no_object\">TypeError: cannot use 'in' operator to search for 'x' in 'y'</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\">RangeError: invalid array length</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_assignment_left-hand_side\">ReferenceError: invalid assignment left-hand side</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment\">TypeError: invalid assignment to const \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_date\">RangeError: invalid date</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer\">SyntaxError: for-in loop head declarations may not have initializers</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_for-of_initializer\">SyntaxError: a declaration in the head of a for-of loop can't have an initializer</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/invalid_right_hand_side_instanceof_operand\">TypeError: invalid 'instanceof' operand 'x'</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/is_not_iterable\">TypeError: 'x' is not iterable</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse\">SyntaxError: JSON.parse: bad parsing</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Malformed_formal_parameter\">SyntaxError: Malformed formal parameter</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Malformed_URI\">URIError: malformed URI sequence</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_bracket_after_list\">SyntaxError: missing ] after element list</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_colon_after_property_id\">SyntaxError: missing : after property id</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_function_body\">SyntaxError: missing } after function body</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_property_list\">SyntaxError: missing } after property list</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_formal_parameter\">SyntaxError: missing formal parameter</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const\">SyntaxError: missing = in const declaration</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_name_after_dot_operator\">SyntaxError: missing name after . operator</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_argument_list\">SyntaxError: missing ) after argument list</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_condition\">SyntaxError: missing ) after condition</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Missing_semicolon_before_statement\">SyntaxError: missing ; before statement</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/More_arguments_needed\">TypeError: More arguments needed</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Negative_repetition_count\">RangeError: repeat count must be non-negative</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/No_non-null_object\">TypeError: \"x\" is not a non-null object</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/No_properties\">TypeError: \"x\" has no properties</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/No_variable_name\">SyntaxError: missing variable name</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Non_configurable_array_element\">TypeError: can't delete non-configurable array element</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_codepoint\">RangeError: argument is not a valid code point</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_constructor\">TypeError: \"x\" is not a constructor</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_a_function\">TypeError: \"x\" is not a function</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Not_defined\">ReferenceError: \"x\" is not defined</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Precision_range\">RangeError: precision is out of range</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Property_access_denied\">Error: Permission denied to access property \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Read-only\">TypeError: \"x\" is read-only</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter\">SyntaxError: redeclaration of formal parameter \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value\">TypeError: Reduce of empty array with no initial value</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Reserved_identifier\">SyntaxError: \"x\" is a reserved identifier</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Resulting_string_too_large\">RangeError: repeat count must be less than infinity</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Stmt_after_return\">Warning: unreachable code after return statement</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Strict_Non_Simple_Params\">SyntaxError: \"use strict\" not allowed in function with non-simple parameters</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Too_much_recursion\">InternalError: too much recursion</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Undeclared_var\">ReferenceError: assignment to undeclared variable \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Undefined_prop\">ReferenceError: reference to undefined property \"x\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Unexpected_token\">SyntaxError: Unexpected token</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Unexpected_type\">TypeError: \"x\" is (not) \"y\"</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Unnamed_function_statement\">SyntaxError: function statement requires a name</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Unterminated_string_literal\">SyntaxError: unterminated string literal</a></li><li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Errors/Var_hides_argument\">TypeError: variable \"x\" redeclares argument</a></li></ol>\n    </details>\n  </li>\n  <li class=\"toggle\">\n    <details>\n      <summary>更多</summary>\n      <ol>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/JavaScript_technologies_overview\">JavaScript 知识概要</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar\">词法文法</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Data_structures\">JavaScript 数据结构</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Enumerability_and_ownership_of_properties\">属性的可枚举性和所有权</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Iteration_protocols\">Iteration protocols</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Strict_mode\">严格模式</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode\">切换到严格模式</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Template_literals\">模板字符串</a></li>\n        <li><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features\">已废弃的特性</a></li>\n      </ol>\n    </details>\n  </li>\n </ol>\n",
        "body": [{
          "type": "prose",
          "value": {
            "id": "教程",
            "title": "教程",
            "isH3": false,
            "content": "<div></div>\n\n<div class=\"summary\">\n<p><strong>JavaScript&nbsp;(&nbsp;</strong><strong>JS&nbsp;</strong>) 是一种具有<a href=\"/zh-CN/docs/Glossary/First-class_Function\">函数优先</a>的轻量级，解释型或即时编译型的编程语言。虽然它是作为开发Web 页面的脚本语言而出名的，但是它也被用到了很多<a class=\"external\" href=\"https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages\" rel=\" noopener\">非浏览器环境</a>中，例如 <a class=\"external\" href=\"https://nodejs.org/\" rel=\" noopener\">Node.js</a>、&nbsp;<a class=\"external\" href=\"https://couchdb.apache.org\" rel=\" noopener\">Apache CouchDB</a>&nbsp;和 <a href=\"https://www.adobe.com/devnet/acrobat/javascript.html\" class=\"external\" rel=\" noopener\">Adobe Acrobat</a>。JavaScript 是一种<a href=\"/zh-CN/docs/Glossary/Prototype-based_programming\">基于原型编程</a>、多范式的动态脚本语言，并且支持面向对象、命令式和声明式（如函数式编程）风格。了解更多<a href=\"/zh-CN/docs/Web/JavaScript/About_JavaScript\">&nbsp;JavaScript</a>。</p>\n</div>\n\n<p>本部分将专注于 JavaScript 语言本身，而非局限于网页或其他限制环境。想要了解网页有关的 <a href=\"/zh-CN/docs/Glossary/API\">APIs</a>&nbsp;，请参考 <a href=\"/zh-CN/docs/Web/API\">Web APIs</a>&nbsp;以及 <a href=\"/zh-CN/docs/Glossary/DOM\">DOM</a>。</p>\n\n<p>JavaScript 的标准是 <a href=\"/zh-CN/docs/Web/JavaScript/Language_Resources\">ECMAScript</a> 。截至 2012 年，所有的<a href=\"https://kangax.github.io/compat-table/es5/\" class=\"external\" rel=\" noopener\">现代浏览器</a>都完整的支持&nbsp; ECMAScript 5.1，旧版本的浏览器至少支持 ECMAScript 3 标准。2015年6月17日，<a href=\"https://www.ecma-international.org\" class=\"external\" rel=\" noopener\">ECMA国际组织</a>发布了 ECMAScript 的第六版，该版本正式名称为 ECMAScript 2015，但通常被称为 ECMAScript 6 或者 ES6。自此，ECMAScript 每年发布一次新标准。本文档目前覆盖了最新 ECMAScript 的草案，也就是 <a href=\"https://tc39.github.io/ecma262/\" class=\"external\" rel=\" noopener\">ECMAScript2020</a>。</p>\n\n<p>不要将 JavaScript 与&nbsp;<a href=\"https://en.wikipedia.org/wiki/Java_(programming_language)\" class=\"external\" rel=\" noopener\">Java编程语言</a>&nbsp;混淆。虽然“Java”和“JavaScript”都是&nbsp;Oracle 公司在美国和其他国家注册（或未注册）的商标，但是这两门语言在语法、语义与用途方面有很大不同。</p>\n\n<div class=\"column-container\">\n<div class=\"column-half\">\n\n\n<p>通过使用指南和教程来学习如何用JavaScript语言编程。</p>\n\n<h3 id=\"对于完全初学者\">对于完全初学者</h3>\n\n<p>如果你想学习 JavaScript，但苦于没有过 JavaScript 或者其他语言的编程经验，你可以投入到我们的&nbsp;<a href=\"/zh-CN/docs/learn/JavaScript\">JavaScript 主题学习区</a>。那里有完整的学习资源：</p>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Learn/JavaScript/First_steps\">JavaScript 第一步</a></dt>\n <dd>回答一些基本问题，比如“JavaScript 是什么？”、“它是怎么样的？”、“它可以用来做什么？”；同时还讨论如变量、字符串、数值和数组等 JavaScript 的核心特性。</dd>\n <dt><a href=\"/zh-CN/docs/learn/JavaScript/Building_blocks\">JavaScript 基本结构</a></dt>\n <dd>继介绍了 JavaScript 基本的核心特性后，我们需要关注常见的代码块类型，如条件语句，循环，函数和事件。</dd>\n <dt><a href=\"/zh-CN/docs/Learn/JavaScript/Objects\">介绍JavaScript 对象</a></dt>\n <dd>如果你想进一步使用该语言撰写更有效率的代码，理解 JavaScript 面向对象的精髓是很重要的，因此我们提供了该模块来帮助你理解它。</dd>\n</dl>\n\n<h3 id=\"JavaScript_指南\">JavaScript 指南</h3>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Guide\">JavaScript 指南</a></dt>\n <dd>一份更详尽的 JavaScript 指南，适用于有过 JavaScript 或其他语言编程经验的读者。</dd>\n</dl>\n\n<h3 id=\"中级内容\">中级内容</h3>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Learn/JavaScript/Client-side_web_APIs\">客户端 Web API</a></dt>\n <dd>当你正在给网页或者网页 APP 编写客户端 JavaScript 时， 你离不开使用这些 API&nbsp;— 这些用来操作浏览器各个不同方面和网页所在的操作系统，甚至是来自于其他网页和服务器的数据的接口。在这个模块，我们来探究这些 API 是什么，以及怎么在你的日常开发工作中使用一些最常用的 API。</dd>\n</dl>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript\">重新介绍 JavaScript（JS 教程）</a></dt>\n <dd>给那些有 JavaScript 基础的朋友们的&nbsp;JavaScript概述。</dd>\n</dl>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Data_structures\">JavaScript 数据结构</a></dt>\n <dd>JavaScript 数据结构的概述。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness\">如何使用比较操作符</a></dt>\n <dd>JavaScript 提供了三种比较操作符，包括严格比较操作符 <code>===</code> 和非严格的比较操作符 <code>==</code>，以及&nbsp;<a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is\"><code>Object.is()</code></a> 方法。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Closures\">闭包</a></dt>\n <dd>闭包是一个函数与其本身所被定义的词法环境的结合。</dd>\n</dl>\n\n<h3 id=\"高级内容\">高级内容</h3>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\">继承和原型链</a></dt>\n <dd>基于原型继承被外界广泛地误解与低估，这一版块对基于原型的继承作出详细解释。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Strict_mode\">严格模式</a></dt>\n <dd>严格模式规定不能使用未定义的变量。严格模式是对 ECMAScript 5 的严格限制，以求得更高效的性能和更便利的调试。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Typed_arrays\">JavaScript 类型数组</a></dt>\n <dd>为使 JavaScript 处理原始二进制数据而提供的类型数组。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Memory_Management\">内存管理</a></dt>\n <dd>JavaScript 中的内存生命周期和垃圾回收机制。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/EventLoop\">并发模型以及事件循环</a></dt>\n <dd>JavaScript 具有基于“事件循环”的并发模型。</dd>\n</dl>\n</div>\n\n<div class=\"column-half\">\n<h2 id=\"参考\">参考</h2>\n\n<p>浏览完整的&nbsp;<a href=\"/zh-CN/docs/Web/JavaScript/Reference\">JavaScript 参考</a>文档。</p>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects\">标准对象 </a></dt>\n <dd>标准的内置对象例如 <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date\"><code>Date</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>Error</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function\"><code>Function</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math\"><code>Math</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number\"><code>Number</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object\"><code>Object</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp\"><code>RegExp</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a>, <a href=\"/zh-CN/docs/orphaned/Web/JavaScript/Reference/Global_Objects/Map\"><code>Map</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Set\"><code>Set</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\"><code>WeakMap</code></a> , <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\"><code>WeakSet</code></a>&nbsp;以及其他对象</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators\">表达式和运算符</a></dt>\n <dd>运算符的作用：<a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/instanceof\"><code>instanceof</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/typeof\"><code>typeof</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/new\"><code>new</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/this\"><code>this</code></a>，<a href=\"/zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence\">运算符优先级</a>，以及其他运算符。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements\">语句和声明</a></dt>\n <dd>了解 <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/do...while\"><code>do-while</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for...in\"><code>for-in</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/for...of\"><code>for-of</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/try...catch\"><code>try-catch</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/let\"><code>let</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/var\"><code>var</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/const\"><code>const</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/if...else\"><code>if-else</code></a>, <a href=\"/zh-CN/docs/Web/JavaScript/Reference/Statements/switch\"><code>switch</code></a> 以及其他语句和关键字的作用。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Reference/Functions\">函数</a></dt>\n <dd>学习如何使用 JavaScript 函数来开发你的应用。</dd>\n</dl>\n\n<h2 id=\"工具和资源\">工具和资源</h2>\n\n<p>用于编写和调试 JavaScript 代码的实用工具。</p>\n\n<dl>\n <dt><a href=\"/zh-CN/docs/Tools\">Firefox 开发工具</a></dt>\n <dd>包括 <a href=\"/zh-CN/docs/Tools/Scratchpad\">Scratchpad</a>、<a href=\"/zh-CN/docs/Tools/Web_Console\">Web Console</a>、<a href=\"/zh-CN/docs/conflicting/Tools/Performance\">JavaScript Profiler</a>、<a href=\"/zh-CN/docs/Tools/Debugger\">Debugger</a> 等等</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/Shells\">JavaScript Shells</a></dt>\n <dd>允许您快速测试 JavaScript 代码片段。</dd>\n <dt><a href=\"https://togetherjs.com/\" class=\"external\" rel=\" noopener\">TogetherJS</a></dt>\n <dd>\n <p class=\"hero-header-text large\">添加 TogetherJS 到您的网站，让用户实时互助，协作更简单。</p>\n </dd>\n <dt><a href=\"https://stackoverflow.com/questions/tagged/javascript\" class=\"external\" rel=\" noopener\">Stack Overflow</a></dt>\n <dd>你可以在&nbsp;<a href=\"https://stackoverflow.com/\" class=\"external\" rel=\" noopener\">StackOverflow </a>查看或者发布带有 JavaScript 标签的问题。</dd>\n <dt><a href=\"/zh-CN/docs/Web/JavaScript/New_in_JavaScript\">JavaScript版本和发行记录</a></dt>\n <dd>浏览 JavaScript 的历史版本特性和实现情况.</dd>\n <dt><a href=\"https://jsfiddle.net/\" class=\"external\" rel=\" noopener\">JSFiddle</a></dt>\n <dd>编辑 JavaScript、CSS 和 HTML 并获得实时结果。使用外置资源，并和你的团队在线合作。</dd>\n <dt><a href=\"https://plnkr.co/\" class=\"external\" rel=\" noopener\">Plunker</a></dt>\n <dd>Plunker 是一个在线社区，用于创建，协作和共享您的 Web 开发创意。编辑您的 JavaScript、CSS 和 HTML 文件并获取实时结果和文件结构。</dd>\n <dt><a href=\"https://jsbin.com/\" class=\"external\" rel=\" noopener\">JSBin</a></dt>\n <dd>\n <p>JS Bin 是一种开源的协作式的web 开发调试工具。</p>\n </dd>\n</dl>\n</div>\n</div>"
          }
        }],
        "toc": [{
          "text": "教程",
          "id": "教程"
        }],
        "summary": "\nJavaScript ( JS ) 是一种具有函数优先的轻量级，解释型或即时编译型的编程语言。虽然它是作为开发Web 页面的脚本语言而出名的，但是它也被用到了很多非浏览器环境中，例如 Node.js、 Apache CouchDB 和 Adobe Acrobat。JavaScript 是一种基于原型编程、多范式的动态脚本语言，并且支持面向对象、命令式和声明式（如函数式编程）风格。了解更多 JavaScript。\n",
        "popularity": 0.0703,
        "modified": "2021-07-09T00:38:08.000Z",
        "other_translations": [{
          "title": "JavaScript",
          "locale": "de",
          "native": "Deutsch"
        }, {
          "title": "JavaScript",
          "locale": "en-US",
          "native": "English (US)"
        }, {
          "title": "JavaScript",
          "locale": "es",
          "native": "Español"
        }, {
          "title": "JavaScript",
          "locale": "fr",
          "native": "Français"
        }, {
          "title": "JavaScript",
          "locale": "ja",
          "native": "日本語"
        }, {
          "title": "JavaScript",
          "locale": "ko",
          "native": "한국어"
        }, {
          "title": "JavaScript",
          "locale": "pl",
          "native": "Polski"
        }, {
          "title": "JavaScript",
          "locale": "pt-BR",
          "native": "Português (do Brasil)"
        }, {
          "title": "JavaScript",
          "locale": "ru",
          "native": "Русский"
        }, {
          "title": "JavaScript",
          "locale": "zh-TW",
          "native": "正體中文 (繁體)"
        }],
        "source": {
          "folder": "zh-cn/web/javascript",
          "github_url": "https://github.com/mdn/translated-content/blob/main/files/zh-cn/web/javascript/index.html",
          "last_commit_url": "https://github.com/mdn/translated-content/commit/235c34993c7b14f783fc8259cc237ac09f0d3e57",
          "filename": "index.html"
        },
        "parents": [{
          "uri": "/zh-CN/docs/Web",
          "title": "Web 开发技术"
        }, {
          "uri": "/zh-CN/docs/Web/JavaScript",
          "title": "JavaScript"
        }],
        "pageTitle": "JavaScript | MDN",
        "noIndexing": false
      }
    }
  </script>
</body>
</html>